<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<s:include value="/comm/header.jsp" />
<s:include value="/comm/menu.jsp" />
<div class="wrap1">
    	<div class="blank1"></div>
        <div class="outbox">
<!--1 start-->
			<div>
        		<div class="wrap_left">
            
                	<span class="tab7_tt">代购详情</span>
              
            	</div>
            	<s:if test="order.state != 5">
            	<div class="wrap_right">
            		<div>
						<div class="pbox6">
							<ul>
                   				<li class="s2">1.&nbsp;&nbsp;买家下单</li>
                    			<s:if test="order.state == 0">
                    				<li class="bg7">&nbsp;<li>
                    				<li class="s3"><span class="tt">2.&nbsp;&nbsp;买家付款</span></li>
                    				<li class="bg2">&nbsp;<li>
                    				<li class="s2"><span class="tt">3.&nbsp;&nbsp;发货</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">4.&nbsp;&nbsp;买家确认收货</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">5.&nbsp;&nbsp;评价</span></li>
                    				<li class="bg4">&nbsp;<li>
                    			</s:if>
                    			<s:elseif test="order.state == 1">
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">2.&nbsp;&nbsp;买家付款</span></li>
                    				<li class="bg7">&nbsp;<li>
                    				<li class="s3"><span class="tt">3.&nbsp;&nbsp;发货</span></li>
                    				<li class="bg2">&nbsp;<li>
                    				<li class="s2"><span class="tt">4.&nbsp;&nbsp;买家确认收货</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">5.&nbsp;&nbsp;评价</span></li>
                    				<li class="bg4">&nbsp;<li>
                    			</s:elseif>
                    			<s:elseif test="order.state == 2">
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">2.&nbsp;&nbsp;买家付款</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">3.&nbsp;&nbsp;发货</span></li>
                    				<li class="bg7">&nbsp;<li>
                    				<li class="s3"><span class="tt">4.&nbsp;&nbsp;买家确认收货</span></li>
                    				<li class="bg2">&nbsp;<li>
                    				<li class="s2"><span class="tt">5.&nbsp;&nbsp;评价</span></li>
                    				<li class="bg4">&nbsp;<li>
                    			</s:elseif>
                    			<s:else>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">2.&nbsp;&nbsp;买家付款</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">3.&nbsp;&nbsp;发货</span></li>
                    				<li class="bg3">&nbsp;<li>
                    				<li class="s2"><span class="tt">4.&nbsp;&nbsp;买家确认收货</span></li>
                    				<li class="bg7">&nbsp;<li>
                    				<li class="s3"><span class="tt">5.&nbsp;&nbsp;评价</span></li>
                    				<li class="bg5">&nbsp;<li>
                    			</s:else>
                			</ul>
                        </div>
            		</div>
                    
                </div>
                </s:if>
                <div class="clear"></div>
            </div>
            
            
<!--1 end -->
  

 			<div class="pbox7"><div class="tips4"><s:if test="order.state == 0" >托管代购款到代购岛平台</s:if><s:elseif test="order.state == 2 || order.state == 3">买家已确认收货，请评价</s:elseif></div></div>   

			<div class="minfo">
				<div class="tips6">
					当前订单状态：
					<s:if test="order.state == 0">宝贝已买下，等待付款。</s:if>
					<s:elseif test="order.state == 1">
						买家已付款，等待经纪人发货
					</s:elseif>
					<s:elseif test="order.state == 2">经纪人已发货，等待买家确认</s:elseif>
					<s:elseif test="order.state == 3">
						<s:if test="order.userEvaluation == 1">
							交易成功，请给买家&nbsp;<a href='javascript:showDiv();'><span class="span_broker">评价</span></a>
						</s:if>
						<s:else>
							交易成功
						</s:else>
					</s:elseif>
					<s:else>
						交易关闭
					</s:else>
				</div>
				<div class="tips1">
					<span class="span14">代购岛提醒您</span><br />
					<div id="tips">
						<s:if test="order.state == 0">
							商品被恶意拍下了,该<a href='#'>怎么办</a>？ 
						</s:if>
						<s:elseif test="order.state == 1">
							1、买家已付款,请尽快&nbsp;<a href="delivery.htm?tid=<s:property value='order.transId' />"><span class="span_broker">发货</span></a>,否则买家有权申请退款。<br/>
							2、如果无法发货,请及时与买家联系并说明情况。<br/>
							3、买家申请退款后,须征得买家同意后再操作发货，否则买家有权拒收货物。
						</s:elseif>
						<s:elseif test="order.state == 2">
							如果买家表示未收到货或者收到的货物有问题，请及时联系买家积极处理，友好协商。
						</s:elseif>
						<s:elseif test="order.state == 3">
							交易已成功，如果买家提出售后要求，请积极与买家协商，做好售后服务。
						</s:elseif>
						<s:elseif test="order.state == 4">
							交易已成功，如果买家提出售后要求，请积极与买家协商，做好售后服务。
						</s:elseif>
					</div>
				</div>
				<div class="mtip">
					<span class="span36">订单信息</span><br />
					收货地址：<s:property value="order.address.person" />,<s:property value="order.address.phone" />,<s:property value="order.address.address" />,<s:property value="order.address.postcode"  /><br/>
					买家留言：<s:property value="order.message" />
				</div>
				<div class="mtip">
					<span class="span36">买家信息</span><br />
					【呢称】<s:property value="order.buyer.nickName" />&nbsp;&nbsp;&nbsp;&nbsp;【真实姓名】<s:property value="order.buyer.realName" />&nbsp;&nbsp;&nbsp;&nbsp;【联系电话】<s:property value="order.buyer.mobile" />&nbsp;&nbsp;&nbsp;&nbsp;【邮件】<s:property value="order.buyer.email" />
				</div>
				<div class="mtip">
					<span class="span36">订单信息</span><br />
					【订单编号】<s:property value="order.transId" />&nbsp;&nbsp;&nbsp;&nbsp;
					【成交时间】<s:date name="order.startTime" format="yyyy-MM-dd HH:mm:ss"/>&nbsp;&nbsp;&nbsp;&nbsp;
					<s:if test="order.state != 4">
						<s:if test="order.state >= 1">【付款时间】<s:date name="order.payTime" format="yyyy-MM-dd HH:mm:ss"/>&nbsp;&nbsp;&nbsp;&nbsp;</s:if>
						<s:if test="order.state == 3">【确认时间】<s:date name="order.endTime" format="yyyy-MM-dd HH:mm:ss"/></s:if>	
					</s:if>
					
				</div>
			</div>

<!--订单确认列表开始-->
			<div class="pbox13">
                <table class="trading_tab">
		    		<tr>
		    			<th class="trading_th0">图片</th>
						<th class="trading_th1">名称</th>
						<th class="trading_th2">单价</th>
						<th class="trading_th3">服务费</th>
						<th class="trading_th4">数量</th>
						<th class="trading_th5">商品总价</th>
						<th class="trading_th6">运费</th>
		   			</tr>
		   				<s:iterator value="order.orderDetails" status="st">
		   					<tr>
		   						<td class="trading_td0">
		   							<a href="canBuyDetail.htm?id=<s:property value='productId' />" target="_blank">
		   								<img src="<s:property value='image50'/>"/>
		   							</a>
		   						</td>
		   						<td class="trading_td1"><a href="canBuyDetail.htm?id=<s:property value='productId' />" target="_blank"><s:property value="goodsName" /></a></td>
		   						<td class="trading_td2">￥<s:property value="price" /></td>
		   						<td class="trading_td3">￥<s:property value="serviceFee" /></td>
		   						<td class="trading_td4"><s:property value="number" /></td>
		   						<s:if test="#st.index == 0">
		   							<td class="trading_td5" rowspan="<s:property value='order.orderDetails.size' />"><s:property value="order.total" /></td>
		   						<td class="trading_td6" rowspan="<s:property value='order.orderDetails.size' />">￥<s:property value="order.logisticCharge" />
		   						</s:if>
		   						
		   					</tr>
						</s:iterator>
				</table>
				<div class="w1_order">实收款：<span class="span2">￥<s:property value="order.payment" /></span></div>



         </div>
         
 <!--订单确认列表结束-->
        </div>
</div>
<s:include value="/comm/bottom.jsp" />
<div class="pbox_dgc pbox_pingjia" id="pbox_dgc">
        
         <div class="wrap_right_dgc">
             <p><a href="javascript:closeDiv()">&nbsp;&nbsp;&nbsp;</a></p>
    	 </div>
         
         <div class="wrap_left_dgc">   
         		<s:form id="evaluate" action="evaluate" method="post">
         		<input type="hidden" name="tid" value="<s:property value='order.transId' />" />
         		<input type="hidden" name="userType" value="2" />
         		<dl>
              		
              		<dd>
              			评分：
              			<input type="radio" name="evaluateModel.level" value="1" checked />好评&nbsp;
              			<input type="radio" name="evaluateModel.level" value="2"/>中评&nbsp;
              			<input type="radio" name="evaluateModel.level" value="3"/>差评</dd>
              		<dd>
              			内容：<s:textfield id="info" name="evaluateModel.info" cssClass="input1" />
              		</dd>
              		<dd class="end1"><a href='javascript:$("#evaluate").submit();'>提交</a></dd>
           		</dl>
         		</s:form>
         </div>
        
        </div>
        <div id="fixbg_dgc" class="fixbg_dgc" style="display:none;">			
</div>
<SCRIPT type=text/javascript>
function showDiv(){
	document.getElementById('pbox_dgc').style.display='block';
	document.getElementById('fixbg_dgc').style.display='block';
}

function closeDiv(){
	document.getElementById('pbox_dgc').style.display='none';
	document.getElementById('fixbg_dgc').style.display='none';
}


</SCRIPT>